package com.yugao.fintech.antelope.pay.payment.controller.refund;

import com.yugao.fintech.antelope.base.log.OperateLog;
import com.yugao.fintech.antelope.pay.common.annotation.PayCheck;
import com.yugao.fintech.antelope.pay.model.rqrs.pay.refund.RefundOrderQO;
import com.yugao.fintech.antelope.pay.payment.process.refund.QueryRefundOrderProcess;
import com.yugao.fintech.antelope.pay.validation.PaySignGroup;
import com.yugao.fintech.framework.core.response.Resp;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 商户退款单查询controller
 */
@Slf4j
@RestController
@RequestMapping("/pay/refund")
public class QueryRefundOrderController {

    @Autowired
    private QueryRefundOrderProcess queryRefundOrderProcess;

    /**
     * 查单接口
     */
    @OperateLog(isSaveDb = false)
    @GetMapping("/getRefundOrder")
    @PayCheck
    public Resp<?> getRefundOrder(@Validated(value = PaySignGroup.class) RefundOrderQO rq) {
        return queryRefundOrderProcess.getRefundOrder(rq);
    }
}
